<template>
  <div class="dashboard-container">
    <div>
      <p class="welcome">欢迎进入，</p>
      <p class="platform">{{title}}</p>
    </div>
    <!-- <div class="dashboard-text">name:{{name}}</div>
    <div class="dashboard-text">roles:<span v-for='role in roles' :key='role'>{{role}}</span></div> -->
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'dashboard',
  data () {
    return {
      title: this.$store.getters.systemName
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'roles',
      'token'
    ])
  }
}
</script>

<style rel="stylesheet/scss" lang="scss">
.dashboard {
  &-container {
    width: 100%;
    height: 100%;
    background: url('../assets/first-page.jpg') no-repeat;
    background-size: cover;
    position: absolute;
    color: white;
    div{
      position: absolute;
      left: 50%;
      top: 37%;
      margin-left: -144px;
    }
    .welcome{
      font-size: 26px;
    }
    .platform{
      font-size: 36px;
      font-weight: bold;
    }
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
